﻿using ProtoBuf;

namespace PnJ.Aliyun.OTS.Models
{
    /// <summary>
    /// 在PutRow，UpdateRow和DeleteRow中使用的行判断条件，目前只含有row_existence一项
    /// </summary>
    [ProtoContract(Name = "Condition")]
    public class Condition
    {
        public Condition()
        {

        }
        public Condition(RowExistenceExpectation rowExistense)
        {
            this.RowExistence = rowExistense;
        }

        private RowExistenceExpectation rowExistence = new RowExistenceExpectation();
        /// <summary>
        /// 对该行进行行存在性检查的设置
        /// </summary>
        [ProtoMember(1, Name = "row_existence", IsRequired = true)]
        public RowExistenceExpectation RowExistence { get { return rowExistence; } set { rowExistence = value; } }
    }
}
